package com.cloudsigns.factorymanager2.produce.fragment.produce_team;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.cloudsigns.factorymanager2.R;
import com.cloudsigns.factorymanager2.produce.activity.produce_team.ProduceTeamOrderListActivity;

public class ProduceTeamFragment extends Fragment implements View.OnClickListener {
    private RelativeLayout rl_order_list, rl_produce_recipients, rl_supply_center;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_produce_team, null);
        rl_order_list = view.findViewById(R.id.rl_order_list);
        rl_produce_recipients = view.findViewById(R.id.rl_produce_recipients);
        rl_supply_center = view.findViewById(R.id.rl_supply_center);

        rl_order_list.setOnClickListener(this);
        rl_produce_recipients.setOnClickListener(this);
        rl_supply_center.setOnClickListener(this);
        return view;
    }

    @Override
    public void onClick(View view) {
        Intent intent;
        switch (view.getId()) {
            // 工单列表
            case R.id.rl_order_list:
                intent=new Intent(getActivity(),ProduceTeamOrderListActivity.class);
                startActivity(intent);
                break;
            // 生产领用
            case R.id.rl_produce_recipients:
                break;
            // 供需中心
            case R.id.rl_supply_center:
                break;
        }
    }
}
